package com.fsserver.core.service;

import com.fsserver.core.dto.PaymentRequestDTO;
import com.fsserver.core.entity.PaymentTransaction;
import com.fsserver.core.vo.PaymentResponseVO;

import java.util.Map;

/**
 * 支付服务接口
 * Payment Service
 *
 * @author fsserver
 */
public interface PaymentService {

    /**
     * 创建支付
     * Create payment
     *
     * @param paymentRequestDTO 支付请求DTO
     * @return 支付响应
     */
    PaymentResponseVO createPayment(PaymentRequestDTO paymentRequestDTO);

    /**
     * 查询支付
     * Query payment
     *
     * @param orderNo     订单号
     * @param paymentType 支付类型
     * @return 支付交易
     */
    PaymentTransaction queryPayment(String orderNo, String paymentType);

    /**
     * 关闭支付
     * Close payment
     *
     * @param orderNo     订单号
     * @param paymentType 支付类型
     * @return 是否成功
     */
    boolean closePayment(String orderNo, String paymentType);

    /**
     * 处理支付通知
     * Handle payment notification
     *
     * @param paymentType 支付类型
     * @param params      通知参数
     * @return 是否成功
     */
    boolean handlePaymentNotification(String paymentType, Map<String, String> params);
} 